<template>
  <div class="drop" @click="getDetailFn(optionData.id,optionData.type)">
    <div class="drop-left" :style="{background: '#F56C6C'}">
      <p class="drop-left-icon"></p>
    </div>
    <div class="drop-right">
      <p>{{ optionData.content }}</p>
      <p>{{ optionData.create_time }}</p>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    optionData: {
      type: Object,
      default: {},
    }
  },
  components: {},
  methods: {
    getDetailFn(id, type) {
      this.$emit('showDetailList', {id: id, type: type})
    }
  }
}
</script>

<style scoped>
.drop {
  width: 300px;
  min-height: 65px !important;
  max-height: 87px !important;
  border-bottom: 1px solid #dcdfe6;
  padding: 12px 14px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;

}

.drop:hover {
  background: #E2EFFD;
}

.drop:hover .drop-left-icon {
  transform: rotate(360deg);
  opacity: 1;
}

.drop-left {
  width: 8px;
  height: 8px;
  background: burlywood;
  border-radius: 4px;
  margin-right: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.drop-left-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  opacity: 0.9;
  transition: all 0.5s;
}

.drop-right {
  flex: 1;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}

.drop-right p {
  width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
}

.drop-right p:nth-child(1) {
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: #515a6e;
  margin-bottom: 5px;
  max-height: 44px;
  min-height: 22px;
  text-overflow: -o-ellipsis-lastline;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.drop-right p:nth-child(2) {
  font-size: 12px;
  color: #808695;
}

</style>
